home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / tip / setstrut.tip < prev    next >
Text File  |  1993-09-15  |  2KB  |  52 lines

  1. % This macro source file is from the four volume series
  2. % "TeX in Practice" by Stephan von Bechtolsheim, published
  3. % 1993 by Springer-Verlag, New York.
  4. % Copyright 1993 Stephan von Bechtolsheim.
  5. % No warranty or liability is assumed.
  6. % This macro may be copied freely if no fees other than
  7. % media cost or shipping charges are charged and as long
  8. % as this copyright and the following source code itself
  9. % is not changed. Please see the series for further information.
  10. %
  11. % Version: 1.0
  12. % Date: May 1, 1993
  13. %
  14. %
  15. % This source code is documented in 7.4.3.1, p. I-239.
  16. % Original source in file "vboxes1.TEX", starting line 1639.
  17. \wlog{L: "setstrut.tip" ["vboxes1.TEX," l. 1639, p. I-239]}%
  18. % This file DOES belong to format "texip."
  19. \catcode`\@ = 11
  20. \newdimen\@StrutBaseDimension
  21. \newdimen\@StrutSkipTemp
  22. \def\ComputeStrut{%
  23.     \@StrutBaseDimension = \baselineskip
  24.     \ifdim\baselineskip < 0pt
  25.         \errhelp = {You probably called \string\offinterlineskip
  26.                 before \string\ComputeStrut}
  27.         \errmessage{\string\ComputeStrut: negative
  28.                 \string\baselineskip (\the\baselineskip)}% 
  29.     \fi
  30. }
  31. \def\MyStrut{% 
  32.     \vrule height 0.7\@StrutBaseDimension
  33.            depth 0.3\@StrutBaseDimension
  34.            width 0pt
  35. }
  36. \def\HigherStrut #1{% 
  37.     \@StrutSkipTemp = 0.7\@StrutBaseDimension
  38.     \advance\@StrutSkipTemp by #1% 
  39.     \vrule height \@StrutSkipTemp
  40.            depth 0.3\@StrutBaseDimension
  41.            width 0pt
  42. }
  43. \def\DeeperStrut #1{% 
  44.     \@StrutSkipTemp = 0.3\@StrutBaseDimension
  45.     \advance\@StrutSkipTemp by #1% 
  46.     \vrule height 0.7\@StrutBaseDimension
  47.            depth \@StrutSkipTemp
  48.            width 0pt
  49. }
  50. \ComputeStrut
  51. \catcode`\@ = 12
  52.